







<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so search-form">
            <input class="layui-input"  autocomplete="off" placeholder="开始日" name="date1"  value="{:input('date1')}" id="start">
            <input class="layui-input"  autocomplete="off" placeholder="截止日" name="date2"  value="{:input('date2')}" id="end">
            <input type="text" name="search_data"  placeholder="用户名|UID|店铺名" autocomplete="off" value="{:input('search_data')}"  class="layui-input">
            <div class="layui-input-inline">
                <select name="wallet_id">
                    <option value="" >全部币种</option>
                    <option value="1" {notempty name="param['wallet_id']"}{if condition="$param['wallet_id'] eq 1"} selected="selected" {/if}{/notempty} >总包</option>
                    {volist name='wallet' id='vo'}
                    <option value="{$vo['id']}" {notempty name="param['wallet_id']"}{if condition="$param['wallet_id'] eq $vo['id']"} selected="selected" {/if}{/notempty} >{$vo['name']}</option>
                    {/volist}
                </select>
            </div>
            <button class="layui-btn"  id="search"  url="{:url('shop_list')}"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>

        </form>
    </div>
    <xblock>
        <button class="layui-btn" onclick="setCompany(2)">批量通过</button>
        <button class="layui-btn layui-btn-danger" onclick="setCompany(3)">批量不通过</button>
        <!--<button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button>-->
        <!--<ob_link><a  href="{:url('shopAdd')}" style="color: white">   <button class="layui-btn" >新 增</button></a></ob_link>-->
        <span class="x-right" style="line-height:40px;margin-right:10px;">共有数据：{$list.count} 条</span>
    </xblock>
    <table class="layui-table x-admin">
        <thead>
        <tr>
            <th>
                <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
            </th>
            <th>
                序号
            </th>
            <th>会员基础信息</th>
            <th>会员实名信息</th>
            <th>店铺申请信息</th>
            <th>操作</th>
        </thead>
        {notempty name='list.list'}
        <tbody>
        {volist name='list.list' id='vo' key="k"}
        <tr>
            <td>
                {if condition="$vo['state'] eq 1"}
                <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id="{$vo.id}"><i class="layui-icon">&#xe605;</i></div>
                {/if}
            </td>
            <td class="text-center">
                {$k}
            </td>
            <td>
                <div><label>会员账号:</label><span>{$vo.user_name}</span></div>
                <div>  <label>推荐人:</label><span>{$vo.member.leader_nickname}</span></div>
                <div>  <label>手机号:</label><span>{$vo.member.mobile}</span></div>
                <div>  <label>注册时间:</label><span>{$vo.member.create_time|date='Y-m-d H:i:s',###}</span></div>
                <div>  <label>是否赌王:</label><span> {eq name="vo.member.is_king" value="0"}
                否
                {else/}
                是
                {/eq}</span></div>

            </td>
            <td>
                <div>  <label>真实姓名:</label><span>{$vo.true_name}</span></div>
                <div>  <label>身份证号:</label><span>{$vo.idcard}</span></div>
                <div>  <label>身份证正面:</label><span>    <a href="{$vo.full_face_photo}" target="_blank"><img class="admin-list-img-size" src="{$vo.full_face_photo}"/></a></span></div>
                <div>  <label>身份证反面:</label><span>  <a href="{$vo.negative_photo}" target="_blank"><img class="admin-list-img-size" src="{$vo.negative_photo}"/></a></span></div>
                <div>  <label>手持身份证:</label><span> <a href="{$vo.hand_held_photo}" target="_blank"><img class="admin-list-img-size" src="{$vo.hand_held_photo}"/></a></span></div>

            </td>
            <td>
                <div><label>店铺名称:</label><span>{$vo.shop_name}</span></div>
                <div>  <label>收款方式:</label><span>{$vo.pay_array}</span></div>
                <div>  <label>币种:</label><span>{$vo.wallet.name}</span></div>
                <div>  <label>申请时间:</label><span>{$vo.create_time}</span></div>
                <div>  <label>状态:</label><span>{$vo.state_text}</span></div>


            </td>

            <td class="td-manage text-center">
                {if condition="$vo['state'] eq 1"}
                <ob_link><a title="通过" class="ajax-get"  href="{:url('update_info', array('ids' => $vo['id'], 'state' => 2))}" ><span class='badge layui-btn'>通过</span>

                </a></ob_link>
                <ob_link> <a title="不通过" class="ajax-get"  href="{:url('update_info', array('ids' => $vo['id'], 'state' => 3))}" ><span class='badge layui-btn layui-btn-danger'>不通过</span>

                </a></ob_link>
                {/if}
                <!--<ob_link><a title="查看详情"  href="{:url('shopCheckEdit', array('id' => $vo['id']))}" >-->
                    <!--<i class="layui-icon">&#xe642;</i>-->
                <!--</a></ob_link>-->
            </td>
        </tr>
        {/volist}
        {else/}
        <tbody><tr class="odd"><td colspan="12" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr></tbody>
        {/notempty}

        </tbody>
    </table>
    <div class="page">
        {notempty name='list.list'}   {$list.list->render()}{/notempty}
    </div>

</div>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        layer=layui.layer;
        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });


    function setCompany (state) {

        var data = tableCheck.getData();
        if(data.length==0){
            layer.msg('请选择店铺');
            return
        }


        //捉到所有被选中的，发异步进行删除
        //监听提交
        var url = "{:url('update_info')}";

        $.post(url, {ids: data, state: state}, function (d) {
            if (d.code == 1) {

                window.location.reload();

            } else {
                layer.msg(d.msg);

            }
        }, 'json');



    }





    //导出功能
    $(".export").click(function(){

        window.location.href = searchFormUrl($(".export"));
    });
</script>

</body>

</html>




